package com.example.demo.controller;

import com.example.demo.commom.Result;
import com.example.demo.entity.LendRecord;

import com.example.demo.service.LendRecordService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/lendRecord1")
public class LendRecordController1 {

    @Resource
    private LendRecordService lendRecordService;

    @PutMapping
    public Result<?> update(@RequestBody LendRecord lendRecord) {
        int result = lendRecordService.updateByCondition(lendRecord);
        return result > 0 ? Result.success() : Result.error("400", "更新失败");
    }
}